package designpatterns.flyweight;

import designpatterns.facade.Shape;
import lombok.extern.slf4j.Slf4j;

/**
 * @author LiDong
 * @version 1.0.0
 * @createTime 2/14/2022 9:03 PM
 */
@Slf4j
public class Circle implements Shape {

    private final String color;
    private int x;
    private int y;
    private int radius;

    public Circle(String color) {
        this.color = color;
    }

    @Override
    public void draw() {
        log.info(toString());
    }

    public void setX(int x) {
        this.x = x;
    }

    public void setY(int y) {
        this.y = y;
    }

    public void setRadius(int radius) {
        this.radius = radius;
    }

    @Override
    public String toString() {
        return "Circle{" +
                "color='" + color + '\'' +
                ", x=" + x +
                ", y=" + y +
                ", radius=" + radius +
                '}';
    }
}
